package com.lyf.mapper;

import com.lyf.entity.Perms;
import com.lyf.entity.Role;
import com.lyf.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {

    void save(User user);

    User findByUsername(String username);
    //根据用户名查询所有角色
    User findRolesByUsername(String username);
    //根据角色id查询权限集合
    List<Perms> findPermsByRoleId(String id);
}
